package cn.itsource.pethome.dept.controller;

import cn.itsource.pethome.dept.domain.Employee;
import cn.itsource.pethome.dept.service.IEmployeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/emp")
@Api(value = "员工的API",description="员工相关的CRUD功能")
public class EmployeeController {
    @Autowired
    private IEmployeeService employeeService;

    /**
     * 查询所有
     * @return
     */
    @GetMapping
    @ApiOperation(value = "通过ID查询员工" )
    public List<Employee> queryEmployee(){
        return employeeService.findAll();
    }



}
